package com.ggk911.pharmacy_system.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ggk911.pharmacy_system.entity.DrugInfo;
import com.ggk911.pharmacy_system.mapper.DrugInfoMapper;
import com.ggk911.pharmacy_system.service.IDrugInfoService;
import org.springframework.stereotype.Service;

/**
 * @author ggk-911
 * @version 1.0 2023/3/9 12:17
 */
@Service
public class DrugInfoServiceImpl extends ServiceImpl<DrugInfoMapper, DrugInfo> implements IDrugInfoService {
    /**
     * 重写的page方法
     * @param page
     * @param queryWrapper
     * @param <E>
     * @return
     */
    @Override
    public <E extends IPage<DrugInfo>> E page(E page, Wrapper<DrugInfo> queryWrapper) {
        return baseMapper.selectPage(page, queryWrapper);
    }

    /**
     * 通过code查询
     */
    public DrugInfo selectByDrugInfoNationalCode(String code){
        return baseMapper.selectByDrugInfoNationalCode(code);
    }



}
